<?php
// Include the main Propel script
require_once "Propel/Propel.php";

class Zen_Orm_Propel extends Zen_Base
{
    protected $_Zen_Orm_Propel = array('model' => '');

    public function fetch()
    {
        Zen::$model = Zen::$system."/app/Models/".$this->_config['model'];
        // Initialize Propel with the runtime configuration
        Propel::init(Zen::$model."/build/conf/".$this->_config['model']."-conf.php");

        // Add the generated 'classes' directory to the include path
        set_include_path(Zen::$model. "/build/classes" .
                         PATH_SEPARATOR . get_include_path());
        return ;
    }
}